﻿using System.Collections.Generic;

namespace com.binance.client.model.enums
{
	 

	public sealed class BalanceType
	{
	  public static readonly BalanceType TRADE = new BalanceType("TRADE", InnerEnum.TRADE, "trade");
	  public static readonly BalanceType FROZEN = new BalanceType("FROZEN", InnerEnum.FROZEN, "frozen");
	  public static readonly BalanceType LOAN = new BalanceType("LOAN", InnerEnum.LOAN, "loan");
	  public static readonly BalanceType INTEREST = new BalanceType("INTEREST", InnerEnum.INTEREST, "interest");
	  public static readonly BalanceType LOAN_AVAILABLE = new BalanceType("LOAN_AVAILABLE", InnerEnum.LOAN_AVAILABLE, "loan-available");
	  public static readonly BalanceType TRANSFER_OUT_AVAILABLE = new BalanceType("TRANSFER_OUT_AVAILABLE", InnerEnum.TRANSFER_OUT_AVAILABLE, "transfer-out-available");

	  private static readonly IList<BalanceType> valueList = new List<BalanceType>();

	  static BalanceType()
	  {
		  valueList.Add(TRADE);
		  valueList.Add(FROZEN);
		  valueList.Add(LOAN);
		  valueList.Add(INTEREST);
		  valueList.Add(LOAN_AVAILABLE);
		  valueList.Add(TRANSFER_OUT_AVAILABLE);
	  }

	  public enum InnerEnum
	  {
		  TRADE,
		  FROZEN,
		  LOAN,
		  INTEREST,
		  LOAN_AVAILABLE,
		  TRANSFER_OUT_AVAILABLE
	  }

	  public readonly InnerEnum innerEnumValue;
	  private readonly string nameValue;
	  private readonly int ordinalValue;
	  private static int nextOrdinal = 0;



	  private readonly string code;

	  internal BalanceType(string name, InnerEnum innerEnum, string code)
	  {
		this.code = code;

		  nameValue = name;
		  ordinalValue = nextOrdinal++;
		  innerEnumValue = innerEnum;
	  }

	  public override string ToString()
	  {
		return code;
	  }

//JAVA TO C# CONVERTER NOTE: Fields cannot have the same name as methods:EnumLookup


		public static IList<BalanceType> values()
		{
			return valueList;
		}

		public int ordinal()
		{
			return ordinalValue;
		}

		public static BalanceType valueOf(string name)
		{
			foreach (BalanceType enumInstance in BalanceType.valueList)
			{
				if (enumInstance.nameValue == name)
				{
					return enumInstance;
				}
			}
			throw new System.ArgumentException(name);
		}
	}

}